import axios from 'axios'
import { config } from 'api/config'

//第四屏搜索页面热门搜索
export function GetSearchHot() {
  return axios.get(config.url + '/searchHot').then((res) => {
    return Promise.resolve(res.data)
  })
}

// 第四屏,搜索请求数据
export function PostSearchList(query, zhida, page,perpage) {
  const params = new URLSearchParams();
  params.append('query', query);
  params.append('zhida', zhida ? 1 : 0);
  params.append('page', page);  
  params.append('perpage', perpage);  
  return axios.post(config.url + '/searchList', params).then((res) => {
    return Promise.resolve(res.data)
  })
}